//
//  GDFactory.m
//  CloudMD
//
//  Created by apple on 16/2/18.
//  Copyright (c) 2016年 HuaZhengInfo. All rights reserved.
//

#import "GDFactory.h"

@implementation GDFactory

+ (UILabel *)creatUILabelWithFrame:(CGRect)rect text:(NSString *)text textColor:(UIColor *)color textFont:(UIFont *)font{

    UILabel * label = [[UILabel alloc] init];
    label.frame = rect;
    label.text = text;
    label.textColor = color;
    label.font = font;
    return label;
}

+ (UIButton *)creatUIButtonWithFrame:(CGRect)rect backImage:(NSString *)imageName title:(NSString *)title titleLableColcor:(UIColor *)color titleLabelFont:(UIFont *)font{

    UIButton * button = [[UIButton alloc] init];
    button.frame = rect;
    [button setBackgroundImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
    [button setTitle:title forState:UIControlStateNormal];
    button.titleLabel.textColor = color;
    button.titleLabel.font = font;
    return button;
}

+ (UIView *)creatUIViewWithFrame:(CGRect)rect backColor:(UIColor *)color{

    UIView * view = [[UIView alloc] init];
    view.frame = rect;
    view.backgroundColor = color;
    return view;
}

+ (UIImageView *)creatUIImageViewWithFrame:(CGRect)rect backgroundImage:(NSString *)imageName{

    UIImageView * imageView = [[UIImageView alloc] init];
    imageView.frame = rect;
    imageView.image = [UIImage imageNamed:imageName];
    return imageView;
}

@end
